package com.fight.strive.sys.modules.rbac.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.fight.strive.sys.modules.common.PageR;
import com.fight.strive.sys.modules.rbac.dto.RbacUserDto;
import com.fight.strive.sys.modules.rbac.entity.RbacUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface RbacUserMapper extends BaseMapper<RbacUserEntity> {

    /**
     * 分页查询用户列表
     *
     * @param page    page
     * @param wrapper wrapper
     * @return ipage
     */
    @Select("select * from t_sys_rbac_user ${ew.customSqlSegment}")
    IPage<RbacUserDto> listUserByPage(
            PageR<RbacUserEntity> page,
            @Param(Constants.WRAPPER) Wrapper<?> wrapper);
}
